//
//  BaseNavViewController.swift
//  MyLottery
//
//  Created by wujunjie on 2018/7/18.
//  Copyright © 2018年 wujunjie. All rights reserved.
//

import UIKit

class BaseNavViewController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setupUI()
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
}

extension BaseNavViewController {
    ///处理横竖屏
    func setupUI() {
        navigationBar .setBackgroundImage(UIImage.useColorCreateImage(color: UIColor.red, size: CGSize(width: kScreenWidth, height: 64)), for: UIBarMetrics.default)
        navigationBar.shadowImage = UIImage.useColorCreateImage(color: UIColor.black, size: CGSize(width: 1, height: 1))
        self.navigationBar.titleTextAttributes = [NSAttributedStringKey(rawValue: NSAttributedStringKey.foregroundColor.rawValue):UIColor.darkText,NSAttributedStringKey(rawValue: NSAttributedStringKey.font.rawValue):UIFont.systemFont(ofSize: 16)]
        navigationBar.isTranslucent = false
    }
}
